<!DOCTYPE html>
<html>

<head lang="zh">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="/css/index.css">
    <link rel="stylesheet" href="/webjars/bootstrap/css/bootstrap.min.css">
    <script src="/webjars/jquery/jquery.min.js"></script>
    <script src="/webjars/bootstrap/js/bootstrap.min.js"></script>

    <title>上传文件</title>
</head>

<body>
<form action="/file/upload" method="post" id="upload-form" enctype="multipart/form-data">
<div class="container">
    <div class="page-header">上传文件</div>
    <div class="col-lg">

        <div class="input-group">
            <input id="file" type="file" class="form-control" name="fileName" placeholder="选择文件" />
            <button class="btn btn-default" type="button" id="upload-btn">上传</button>
        </div>
        <!-- /input-group -->
    </div>
    <!-- /.col-lg-6 -->
</div>
<!-- /.row -->
</div>
</form>
<script type="text/javascript">
    $(function() {
        $("#upload-btn").click(function () {
            $("#upload-form").submit();
        });
    });
</script>
</body>

</html>